package Elementos;

public class Token extends Elemento {
	private String token;
	private Integer id;
	
	//definir todas las ides de los tokens reservados
	public final static int IDENTIFICADOR=257;
	public final static int IMPORT=258;
	public final static int CTEFUERADERANGO=259;
	public final static int CTEDOBLE=260;
	public final static int DOUBLE=261;
	public final static int CADENA=262;
	public final static int IF=263;
	public final static int ELSE=264;
	public final static int THEN=265;
	public final static int FROM=266;
	public final static int TO=267;
	public final static int PRINT=268;
	public final static int FUNCTION=269;
	public final static int RETURN=270;
	public final static int BEGIN=271;
	public final static int END=272;
	public final static int ABRELLAVE=273;
	public final static int CIERRALLAVE=274;
	public final static int ABREPARENTESIS=275;
	public final static int CIERRAPARENTESIS=276;
	public final static int COMA=277;
	public final static int PUNTO=278;
	public final static int PUNTOYCOMA=279;
	public final static int SUMA=280;
	public final static int RESTA=281;
	public final static int DIVISION=282;
	public final static int MULTIPLICACION=283;
	public final static int ASIGNACION=284;
	public final static int MAYOR=285;
	public final static int MENOR=286;
	public final static int IGUAL=287;
	public final static int MAYORIGUAL=288;
	public final static int MENORIGUAL=289;
	public final static int DISTINTO=290;
	public final static int DO=291;
	public final static int YYERRCODE=256;

	
	public Token(String t, Integer p, Integer d){
		super(p);
		this.token=t;		
		this.id=d;
	}	
	
	public Token(Integer ptr){
		super(ptr);
	}
	
	public String getToken(){
		return this.token;
	}
	public void setToken(String t){
		this.token=t;
	}	
	public Integer getID(){
		return this.id;
	}
	public void setID(Integer d){
		this.id=d;
	}
	
	public String toString(){
		return "Token: " + this.getToken() + " Puntero: " + this.getPuntero() + " ID: " + this.getID();		
	}
	
	@Override
	public boolean esSimbolo() {		
		return true;
	}
}
